﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace LevelEditor.model.elements
{
    class Spring : AbstractPGameObject
    {
        #region Variables
        private float m_straightness;       // Raideur
        private float m_tackiness;          // Viscosite
        private float m_deadening;          // Amortissement

        #endregion

        #region Constructeurs
        public Spring(string name, Dictionary<String, String> pGameObjectData,
                       float straightness, float tackiness, float deadening
                       )
            : base(name, pGameObjectData)
        {
            m_straightness = straightness;
            m_tackiness = tackiness;
            m_deadening = deadening;
        }

        #endregion

        #region Methodes
        public override Dictionary<string, string> getViewData()
        {
            Dictionary<string, string> data = base.getViewData();

            data["straightness"] = m_straightness.ToString();
            data["tackiness"] = m_tackiness.ToString();
            data["deadening"] = m_deadening.ToString();

            return data;
        }

        #endregion

        #region Getters && Setters
        public float straightness
        {
            get { return m_straightness; }
            set { m_straightness = value; }
        }

        public float tackiness
        {
            get { return m_tackiness; }
            set { m_tackiness = value; }
        }

        public float deadening
        {
            get { return m_deadening; }
            set { m_deadening = value; }
        }

        #endregion
    }
}
